package com.du.dupload;

import java.util.List;

public class FFmpeg implements IVideoSplitter {
	private String path;
	private FFmpegSplitter splitter;

	public FFmpeg(String path) {
		this.path = path;
	}

	@Override
	public float getProgressPercent() {
		return splitter.getProgress();
	}

	@Override
	public void close() {
		

	}

	@Override
	public void startSplitting() {
		splitter.split();

	}
	
	@Override
	public String getFileName() {
		return splitter.getFilename();

	}


	@Override
	public boolean isCompleted() {
		return splitter.isFinished();
	}

	@Override
	public void stopSplitting() {
		splitter.cancel();

	}

	@Override
	public boolean isError() {
		return splitter.isError();
	}

	@Override
	public void initializeSplitting() {
		splitter = new FFmpegSplitter(path);

	}

	@Override
	public List<String> getPath() {
		return splitter.getResult();
	}

}
